< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/shared/03120305.xhp

(section: ltrim) (bookmark: bm_id3147574)
LTrim function

LTrim 関数

LTrim Function [Runtime]
LTrim 関数 [実行時](hd_id3147574.1)

Removes all leading spaces at the start of a string expression.
文字列表式の先頭部にあるスペース記号を、すべて削除します。(par_id3145316.2)

(/section: ltrim)

Syntax:
構文:(hd_id3154924.3)

LTrim (Text As String)
LTrim (Text As String)(par_id3148552.4)

Return value:
戻り値:(hd_id3156344.5)

String
文字列(par_id3151056.6)

Parameters:
パラメータ:(hd_id3150543.7)

Text: Any string expression.
Text: 処理をする文字列表現。(par_id3150792.8)

Use this function to remove spaces at the beginning of a string expression.
この関数は、文字列表式の先頭部にあるスペース記号を削除します。(par_id3125863.9)

(embed text/sbasic/shared/00000003.xhp#errorcode : linkinfo)

Error Codes

エラーコード(hd_id3152869.37)

(/embed text/sbasic/shared/00000003.xhp#errorcode)

(embed text/sbasic/shared/00000003.xhp#err5 : linkinfo)

5 Invalid procedure call
5 無効なプロシージャー呼び出しです (par_id3150891.41)

(/embed text/sbasic/shared/00000003.xhp#err5)

Example:
例:(hd_id3145419.10)

Sub ExampleSpaces
Sub ExampleSpaces(par_id3154909.11)

Dim sText2 As String,sText As String,sOut As String
Dim sText2 As String,sText As String,sOut As String(par_id3150768.12)

sText2 = " <*Las Vegas*> "
sText2 = " <*Las Vegas*> "(par_id3149204.13)

sOut = "'"+sText2 +"'"+ Chr(13)
sOut = "'"+sText2 +"'"+ Chr(13)(par_id3159252.15)

sText = Ltrim(sText2) REM sText = "<*Las Vegas*> "
sText = Ltrim(sText2) REM sText = "<*Las Vegas*> "(par_id3147350.16)

sOut = sOut + "'"+sText +"'" + Chr(13)
sOut = sOut + "'"+sText +"'" + Chr(13)(par_id3153951.17)

sText = Rtrim(sText2) REM sText = " <*Las Vegas*>"
sText = Rtrim(sText2) REM sText = " <*Las Vegas*>"(par_id3153363.18)

sOut = sOut +"'"+ sText +"'" + Chr(13)
sOut = sOut + "'"+sText +"'" + Chr(13)(par_id3159154.19)

sText = Trim(sText2) REM sText = "<*Las Vegas*>"
sText = Trim(sText2) REM sText = " <*Las Vegas*> "(par_id3154322.20)

sOut = sOut +"'"+ sText +"'"
sOut = sOut +"'"+ sText +"'"(par_id3146924.21)

MsgBox sOut
MsgBox sOut(par_id3156444.22)

end sub
end sub(par_id3147318.23)


< Prev / Next >